package org.example.easybuy.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.easybuy.entity.Category;
import org.example.easybuy.entity.Product;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface ProductDao {
    List<Product> selectProductList(Map<String,Object> params);
    List<Product> selectAll();
    int deleteProduct(String id);
    Product selectById(String id);
    List<Category> getUpdateLevel(@Param("type") int type,@Param("id")int id);
    int updateProduct(Product product);
    int addProduct(Product product);
    Product selectByNameAndDate(Product product);
    Product checkProductName(Map<String,Object> params);
    List<Product> selectProductsById(int id);
    int updateStock(Product product);
}
